package com.xqyq.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="match_content")
public class MatchContent {
	private int content_id;
	//比赛
	private Match match;
	//最新动态
	private String last_news;
	//简介
	private String profile;
	//奖项设立
	private String award;
	//联系方式
	private String contact;
	//赛事流程
	private String process;
	//主办单位、协办单位
	private String unit;
	//鸣谢、广告、赞助单位
	private String support;
	
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getContent_id() {
		return content_id;
	}
	public void setContent_id(int content_id) {
		this.content_id = content_id;
	}
	@OneToOne(cascade={CascadeType.REFRESH},fetch=FetchType.LAZY)
	@JoinColumn(name="match_id")
	public Match getMatch() {
		return match;
	}
	public void setMatch(Match match) {
		this.match = match;
	}
	@Lob
	@Column(columnDefinition="text")
	public String getLast_news() {
		return last_news;
	}
	public void setLast_news(String last_news) {
		this.last_news = last_news;
	}
	@Lob
	@Column(columnDefinition="text")
	public String getProfile() {
		return profile;
	}
	public void setProfile(String profile) {
		this.profile = profile;
	}
	@Lob
	@Column(columnDefinition="text")
	public String getAward() {
		return award;
	}
	public void setAward(String award) {
		this.award = award;
	}
	public String getContact() {
		return contact;
	}
	public void setContact(String contact) {
		this.contact = contact;
	}
	@Lob
	@Column(columnDefinition="text")
	public String getProcess() {
		return process;
	}
	public void setProcess(String process) {
		this.process = process;
	}
	@Lob
	@Column(columnDefinition="text")
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	@Lob
	@Column(columnDefinition="text")
	public String getSupport() {
		return support;
	}
	public void setSupport(String support) {
		this.support = support;
	}
	@Override
	public String toString() {
		return "MatchContent [content_id=" + content_id + ", last_news=" + last_news + ", profile=" + profile
				+ ", award=" + award + ", contact=" + contact + ", process="
				+ process + ", unit=" + unit + ", support=" + support + "]";
	}

	
	
}
